
    /*
     * Perhaps the best way to think of objects that you supply to the
     * implement and implementStatic methods, is as traits providers, where
     * each trait is a property of the object.
     * 
     * The example below involves declaring a Credentials class and a 
     * StringFilter class, both of which are used as traits providers by a Mixin 
     * class, by passing their prototypes to the Mixins implement method.
     * 
     * Note that even though Mixin will have all the properties and methods
     * of Credentials and StringFilter, that Mixin itslef will not qualify as
     * an instance of either
     */
    
    Credentials.implement
    (
        {
            username: null
        ,   password: null  
        }
    );
    
    function Credentials (username, password) 
    {
        this.username= username;
        this.password= password;
    };
    
    
    StringFilter.implement
    (
        function accept (value) 
        {
            return String.notEmpty(value);
        }
    );
    
    function StringFilter () {;};
    
    Mixin.implement
    (
        // adopt the credentials traits (its prototype properties)
        Credentials.prototype
        
        // adopt the string filters traits (its prototype properties)
    ,   StringFilter.prototype    
    );
    
    function Mixin () 
    {
        // apply the Credentials instantiation logic to this instance
        Credentials.apply(this, arguments);
        
        // use the StringFilter.prototype.accept method to validate the supplied
        // username and password
        if (!this.accept(this.username))
            throw new Error ('Invalid username');
        
        if (!this.accept(this.password))
            throw new Error ('Invalid password');
    };
    
    
    
        
    
    